//
//  webToolbar.h
//  WebViewPopMenu
//
//  Created by GZMLUser on 15-1-12.
//  Copyright (c) 2015年 GZMLUser. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface ToolbarItem : NSObject
//! 图片
@property (nonatomic, strong) UIImage *image;

//! Item高亮图片
@property (nonatomic, strong) UIImage *highlightedImage;
//! 标题
@property (nonatomic, strong) NSString *title;

- (id)initWithImage:(UIImage *)image highlightImage:(UIImage *)highlightedImage;
- (id)initwithTitle:(NSString *)title;
- (id)initWithImage:(UIImage *)image title:(NSString *)title;

+ (id)itemWithImage:(UIImage *)image highlightImage:(UIImage *)highlightedImage;
+ (id)itemWithTitle:(NSString *)title;
+ (id)itemWithImage:(UIImage *)image title:(NSString *)title;
@end





@class webToolbar;
@protocol webToolbarDelegate <NSObject>

- (void)webToobarItemClicked:(webToolbar *)webtoolbar itemIndex:(NSInteger)itemIndex;

@end



@interface webToolbar : UIView

@property (nonatomic ,weak)id<webToolbarDelegate> delegate;
//! 根据items初始化
- (id)initWithItems:(NSArray *)itemsArray frame:(CGRect)frame;
//! frame为整个toolbar的宽高
- (id)initWithItem:(ToolbarItem *)item  frame:(CGRect)frame;
@end

